package com.hlx.entity;

import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * 目录树实体
 */
@Data
@ToString
public class DirectoryTree {
    private String label;
    private String path;
    private List<DirectoryTree> children;

    public DirectoryTree(String label, String path) {
        this.label = label;
        this.path = path;
        this.children = new ArrayList<>();
    }

    public void addChild(DirectoryTree child) {
        children.add(child);
    }

}